package com.itheima.user.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.lang.Long;
import java.util.Date;
import java.lang.Object;
import java.lang.String;

/**
 * 操作日志表 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Data
@Table(value = "sys_log")
public class SysLogEntity {

    /**
     * 日志ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 操作用户ID
     */
    @Column(value = "user_id")
    private Long userId;

    /**
     * 操作类型（如：DELETE_USER）
     */
    @Column(value = "action")
    private String action;

    /**
     * 操作对象类型（如：user）
     */
    @Column(value = "target_type")
    private String targetType;

    /**
     * 操作对象ID
     */
    @Column(value = "target_id")
    private Long targetId;

    /**
     * 变更详情（旧值/新值）
     */
    @Column(value = "detail")
    private Object detail;

    /**
     * 操作IP
     */
    @Column(value = "ip")
    private String ip;

    /**
     * 操作时间
     */
    @Column(value = "created_time")
    private Date createdTime;


}
